﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dapper_Core.DAL.Impl
{
    public class SelectFieldFactory
    {
        /// <summary>
        /// 得到实例
        /// </summary>
        /// <param name="key">得到实例的索引关键字,规则是自己的单据编号+"_" + 用途+ "_" + 顺序号
        /// 例如：得到预测单上存货的selectField可以为MP01_Inventory_01</param>
        /// <returns></returns>
        public static ISelectField GetInstance(string key)
        {
            switch (key)
            {
                case SelectFieldKey.Sys_User_Role:
                    {
                        return new Sys_User_RoleSelectField();
                    }
                default:
                    {
                        return new DefaultSelectField();
                    }
            }
        }
    }
}
